#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include <AutoHide.h>
#include <QSystemTrayIcon>
#include <QMenu>

#define WORK_TIME 1500

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    ~Widget();

private:
    Ui::Widget *ui;
    void paintEvent(QPaintEvent *);
    void mousePressEvent(QMouseEvent *event);
    QTimer work_timer{this};
    int work_time{WORK_TIME};
    int real_work_time{0};
    AutoHide auto_hide{this};
    QSystemTrayIcon icon{this};

    QMenu menu{this};
    bool real_close{false};


    QString version{"1.0.0.8"};

private slots:
    void on_work_timer();
    void on_about();
    void on_exit();
    void on_pause();
    void on_resume();
    void on_reset();
    void on_sleep();

    void closeEvent(QCloseEvent *event);
};

#endif // WIDGET_H
